import { ArrowRight } from "@nutui/icons-react-taro";
import { Cell } from "@nutui/nutui-react-taro";
import "./index.less";
import Taro, { useDidShow } from "@tarojs/taro";

const setting = () => {
  return (
    <>
      <Cell.Group>
        <Cell
          className="nutui-cell-clickable"
          title="修改资料"
          extra={
            <>
              <ArrowRight />
            </>
          }
          align="center"
          onClick={() => {
            Taro.navigateTo({
              url: `/pages/my/setting/info/index`,
            });
          }}
        />
        <Cell
          className="nutui-cell-clickable"
          title="修改密码"
          align="center"
          extra={<ArrowRight />}
          onClick={() => {
            Taro.navigateTo({
              url: `/pages/my/setting/password/index`,
            });
          }}
        />

        <Cell
          className="nutui-cell-clickable"
          title="退出登录"
          align="center"
          extra={<ArrowRight />}
          onClick={() => {
            Taro.clearStorage();

            Taro.redirectTo({
              url: "/pages/login/index",
            });
          }}
        />
      </Cell.Group>
    </>
  );
};

export default setting;
